package cn.netjava.softkid.chapter09;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import cn.netjava.softkid.chapter08.FilePathInArrayList;

public class FindFileUseMutiThread extends Thread
{
	private String name;
	private String suffix;
	private boolean isStop;
	private List list;
	public FindFileUseMutiThread(String name,String suffix)
	{
		this.name=name;
		this.suffix=suffix;
		isStop =false;
		list = new ArrayList();
	}
	FilePathInArrayList f = new FilePathInArrayList();
	
	public void run()
	{
		long start = System.currentTimeMillis();
		f.getAllFileNames(name, suffix);
		list=f.getAList();
		isStop=true;
		System.out.println("costTime:"+(System.currentTimeMillis()-start));
	}

	public boolean isStop() {
		return isStop;
	}

	public List getList() {
		return list;
	}
}
